//
//  TileView.h
//  etionUI
//
//  Created by wangjian on 7/17/13.
//
//

#import <UIKit/UIKit.h>

@interface CTileUpView : UIView

@property (nonatomic, readonly) UIImageView *iconView;

- (void)moveIconUpAnimated:(BOOL)animated;

@end

typedef enum {ETileDownViewStyleOneRow, ETileDownViewStyleTowRow} ETileDownViewStyle;

@interface CTileDownView : UIView
{
    UILabel *_titleLabel1;
    UILabel *_valueLabel1;
    UILabel *_titleLabel2;
    UILabel *_valueLabel2;
    ETileDownViewStyle _style;
}

@property (nonatomic, readonly) UILabel *titleLabel1;
@property (nonatomic, readonly) UILabel *valueLabel1;
@property (nonatomic, readonly) UILabel *titleLabel2;
@property (nonatomic, readonly) UILabel *valueLabel2;
@property (nonatomic, assign) ETileDownViewStyle style;

- (void)setTitle1:(NSString *)title1 value1:(NSString *)value1 title2:(NSString *)title2 value2:(NSString *)value2 animated:(BOOL)animated;
//- (void)setTitle1:(NSString *)title;
//- (void)setTitle2:(NSString *)title;
//- (void)setValue1:(NSString *)value animated:(BOOL)animated;
//- (void)setValue2:(NSString *)value animated:(BOOL)animated;

@end


// CTileBadgeView 用于在磁贴的右上角显示气泡消息
@interface CTileBadgeView : UIView

@property (nonatomic, assign) UIColor *textColor;
@property (nonatomic, retain) NSString *badgeText;  //气泡显示内容
@property (nonatomic, assign) UIView *parentView;   //气泡所在的父视图，必须设置该参数

+ (CTileBadgeView *)tileBadgeViewForParentView:(UIView *)parentView;
- (void)setBadgeText:(NSString *)badgeText animated:(BOOL)animated;

@end

@interface CTileView : UIView

@property (nonatomic, assign) NSString *badgeText;

- (void)setTitle:(NSString *)title icon:(UIImage *)icon themeColor:(UIColor *)themeColor subItems:(NSDictionary *)dicSubItems;
- (void)updateSubItems:(NSDictionary *)dicSubItems;
//- (void)setInfoWithTitle1:(NSString *)title1 value1:(NSString *)value1 title2:(NSString *)title2 value2:(NSString *)value2 ;

@end
